<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="fy138336">pg_appendonly</title>
  <body>
    <p>The <codeph>pg_appendonly</codeph> table contains information about the storage options and
      other characteristics of append-optimized tables. </p>
    <table id="fy138428">
      <title>pg_catalog.pg_appendonly</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="97pt"/>
        <colspec colnum="3" colname="col3" colwidth="82pt"/>
        <colspec colnum="4" colname="col4" colwidth="138pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph>relid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">The table object identifier (OID) of the compressed table.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>blocksize</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"/>
            <entry colname="col4">Block size used for compression of append-optimized tables. Valid
              values are 8K - 2M. Default is <codeph>32K</codeph>.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>safefswritesize</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"/>
            <entry colname="col4">Minimum size for safe write operations to append-optimized tables
              in a non-mature file system. Commonly set to a multiple of the extent size of the file
              system; for example, Linux ext3 is 4096 bytes, so a value of 32768 is commonly used.
            </entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>compresslevel</codeph>
            </entry>
            <entry colname="col2">smallint</entry>
            <entry colname="col3"/>
            <entry colname="col4">The compression level, with compression ratio increasing from 1 to
              19. <p otherprops="pivotal">When <codeph>quicklz</codeph><sup>1</sup> is specified for
                compresstype, valid values are 1 or 3. With <codeph>zlib</codeph> specified, valid
                values are 1-9. When <codeph>zstd</codeph> is specified, valid values are 1-19.</p></entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>majorversion</codeph>
            </entry>
            <entry colname="col2">smallint</entry>
            <entry colname="col3"/>
            <entry colname="col4">The major version number of the pg_appendonly table.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>minorversion</codeph>
            </entry>
            <entry colname="col2">smallint</entry>
            <entry colname="col3"/>
            <entry colname="col4">The minor version number of the pg_appendonly table.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>checksum</codeph>
            </entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">A checksum value that is stored to compare the state of a block of
              data at compression time and at scan time to ensure data integrity.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>compresstype</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">Type of compression used to compress append-optimized tables.
              Valid values are:<ul id="ul_mrr_hwj_f1b">
                <li><codeph>none</codeph> (no compression)</li>
                <li><codeph>rle_type</codeph> (run-length encoding compression)</li>
                <li><codeph>zlib</codeph> (gzip compression)</li>
                <li><codeph>zstd</codeph> (Zstandard compression)</li>
                <li otherprops="pivotal"><codeph>quicklz</codeph><sup>1</sup></li>
              </ul></entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>columnstore</codeph>
            </entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4"><codeph>1</codeph> for column-oriented storage, <codeph>0</codeph>
              for row-oriented storage.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>segrelid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">Table on-disk segment file id.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>segidxid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">Index on-disk segment file id.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>blkdirrelid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">Block used for on-disk column-oriented table file.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>blkdiridxid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">Block used for on-disk column-oriented index file.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>visimaprelid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">Visibility map for the table.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>visimapidxid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">B-tree index on the visibility map.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
    <note type="note" otherprops="pivotal"><sup>1</sup>QuickLZ compression is available only in the
      commercial release of Tanzu Greenplum.</note>
  </body>
</topic>
